<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
    <meta name="renderer" content="webkit">
    <script src="../../../node_modules/jquery/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="../../../node_modules/bootstrap/dist/css/bootstrap.min.css">
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="../../../node_modules/vue/dist/vue.min.js"></script>
    <link rel="stylesheet" href="../../../node_modules/element-ui/lib/theme-chalk/index.css">
    <script src="../../../node_modules/element-ui/lib/index.js"></script>


    <!-- 自定义 -->
    <script src="../../../node_modules/mockjs/dist/mock.js"></script>
    <script src="../static/js/mock_config.js"></script>
    <script src="../static/js/index.js"></script>
    <link rel="stylesheet" href="../../index.css">

    <!-- PC -->
    <link rel="stylesheet" href="../static/css/OrderOut.css" media="only screen and (max-height:1600px) ">
    <!-- 手机App -->
    <link rel="stylesheet" href="../static/css/OrderOutApp.css" media="only screen and (min-height:1600px) ">
</head>

<body>
    <!--主体-->
    <div class="main clearfix" id="app">

        <div class="header">
            <header>
                <div class="navbar">
                    <div class="card_T">
                        <div class="card A" style="background-color:#0b87fa;color: white;">
                            <ul>
                                <li>
                                    <h8 style="line-height: 78px;">出货计划与实绩看板</h8>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="pc_content">
                        <!-- <div class="card B D" style="background-color: #33814e;">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item">
                                    <h4>逾期已交 </h4>
                                </li>
                                <li class="list-group-item1">
                                    <h4 id="quantity">{{quantity}} 单</h4>
                                </li>
                            </ul>
                        </div> -->
                        <div class="card B" style=" background: #33814e;">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item">
                                    <h4>逾期未交 </h4>
                                </li>
                                <li class="list-group-item1">
                                    <h4>{{defaultDt1.length}} 单</h4>
                                </li>
                            </ul>
                        </div>
                        <div class="card B" style=" background:#33814e;">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item">
                                    <h4>7天待送货 </h4>
                                </li>
                                <li class="list-group-item1">
                                    <h4>{{defaultDt2.length}} 单</h4>
                                </li>
                            </ul>
                        </div>
                        <div class="card B V" style=" background:#33814e;">
                            <ul class="list-group list-group-flush">
                                <li class="list-group-item">
                                    <h4>30天待送货</h4>
                                </li>
                                <li class="list-group-item1">
                                    <h4> {{defaultDt3.length}} 单</h4>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </header>
        </div>

        <div class="main-left">
            <div class="border-container">
                <div class="name-title">
                    逾期未交货
                </div>
                <div>
                    <el-table :data="defaultDt1" :default-sort="{prop: 'date', order: 'descending'}" stripe="true" ref="defaultDt1" :height=el_table_height cell-style="font-size: 18px">
                        <el-table-column prop="SLSP" width="190" align="center" label="送货计划">
                        </el-table-column>
                        <el-table-column prop="GoodsName" width="190" align="center" label="产品名称">
                        </el-table-column>
                        </el-table-column>
                        <el-table-column prop="DelyDate" align="center" label="计划交期">
                        </el-table-column>
                        <el-table-column prop="QtyYu" width="100" align="center" label="逾期数量">
                        </el-table-column>
                        <el-table-column prop="Name" align="center" label="业务担当人">
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
        </div>
        <div class="main-right">
            <div class="border-container1">
                <div class="name-title">
                    7天待送货
                </div>
                <div>
                    <el-table :data="defaultDt2" :default-sort="{prop: 'date', order: 'descending'}" stripe="true" ref="defaultDt2" :height=el_table_height1 cell-style="font-size: 18px">
                        <el-table-column prop="SLSP" width="180" align="center" label="送货计划">
                        </el-table-column>
                        <el-table-column prop="GoodsName" align="center" label="产品名称">
                        </el-table-column>
                        <el-table-column prop="DelyDate"  align="center" label="计划交期">
                        </el-table-column>
                        </el-table-column>
                        <el-table-column prop="WaitQty" align="center" label="待送货数">
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
            <div class="border-container1">
                <div class="name-title">
                    30天待送货
                </div>
                <div>
                    <el-table :data="defaultDt3" :default-sort="{prop: 'date', order: 'descending'}" stripe="true" ref="defaultDt3" :height=el_table_height1 cell-style="font-size: 18px">
                        <el-table-column prop="SLSP" width="180" align="center" label="送货计划">
                        </el-table-column>
                        <el-table-column prop="GoodsName" align="center" label="产品名称">
                        </el-table-column>
                        <el-table-column prop="DelyDate"  align="center" label="计划交期">
                        </el-table-column>
                        </el-table-column>
                        <el-table-column prop="WaitQty" align="center" label="待送货数">
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
        </div>
    </div>

</body>



<script>
    new Vue({
        el: '#app',
        data() {
            return {
                el_table_height: 870,
                el_table_height1: 400,
                defaultDt1: [],
                defaultDt2: [],
                defaultDt3: [],
                quantity: 0 //年度总逾期
            }
        },
        methods: {
            GetTabelDate(that) {
                //年度总逾期
                GetCodeData("VB21110514035564", "Get", "OrderOut").then(function(res) {
                        that.quantity = res.rows[0].quantity
                    })
                    // 逾期未交货
                GetCodeData("VB21110514041186", "Get", "OrderOut").then(function(res) {
                        that.defaultDt1 = res.rows
                    })
                    // 7天待送货
                GetCodeData("VB21110514044938", "Get", "OrderOut").then(function(res) {
                        that.defaultDt2 = res.rows
                    })
                    // 30天待送货
                GetCodeData("VB21110514050393", "Get", "OrderOut").then(function(res) {
                    that.defaultDt3 = res.rows
                })
            },
        },

        mounted() {
            TableAotoRoll([this.$refs.defaultDt1, this.$refs.defaultDt2, this.$refs.defaultDt3])
            var that = this
            setTimeout(function() {
                that.GetTabelDate(that)
            }, 0);
            setInterval(function() {
                that.GetTabelDate(that)
            }, 1000 * 60);
        }
    })
</script>



</html>